package com.igor.bookStore.tapestry.pages;

import java.util.LinkedList;

import org.apache.tapestry5.annotations.Persist;
import org.apache.tapestry5.annotations.Property;
import org.apache.tapestry5.annotations.SetupRender;
import org.apache.tapestry5.ioc.annotations.Inject;

import com.igor.bookStore.beans.SellerBean;
import com.igor.bookStore.inface.Purchase;
import com.igor.bookStore.inface.Seller;
import com.igor.bookStore.service.Sellers;

public class EntrySeller {
    @Property
    @Persist
    private Seller seller;
    @Inject
    private Sellers sellers;
    
    @SetupRender
    public void createObject() {
            seller = new SellerBean();
            seller.setPurchases(new LinkedList<Purchase>());
    

    }
    
    public void onSuccess() {
    	 seller.executeSellerCreation(sellers);

    }

    
    
}
